<template>
  <div class="pagination">
    <el-pagination
        v-if="count > 0"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="current"
        :page-size="10"
        layout="total, prev, pager, next, sizes"
        :total="count">
    </el-pagination>
  </div>
</template>
<script>

export default {
  props:{
    count: Number,
    current: Number
  },
  methods: {
    handleSizeChange(limit){
      this.$emit('handleSizeChange',limit);
    },
    handleCurrentChange(offset){
      this.$emit('handleCurrentChange',offset);
    }
  }
}
</script>
<style lang="less" scoped>
.pagination {
  width: 100%;
  text-align: right;
  margin-top: 12px;
}
</style>
